package com.code.model;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Result<T> {
    private Integer code = 200;
    private String msg; 
    private T data; 
    
    public static <T> Result<T> success(String msg,T data){
        Result<T> result = new Result<>();
        result.setMsg(msg);
        result.setData(data);
        return result;
    }
}
